From be4c0619d544392d29f0d07eea8554f10cec4c7e Mon Sep 17 00:00:00 2001 From: "vhanquez@kneesa.uk.xensource.com" Date: Sat, 18 Mar 2006 13:56:34 +0000 Subject: [PATCH] Fix a race that crash domU by calling xenbus_probe twice if it receive event between xs_init and setting xenbus_running Signed-off-by: Vincent Hanquez --- linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c index 017f36ccdd..a8f3a6c82f 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -1049,6 +1049,8 @@ static int __init xenbus_probe_init(void) if (xsd_port_intf) xsd_port_intf->read_proc = xsd_port_read; } + else + xenstored_ready = 1; /* Initialize the interface to xenstore. */ err = xs_init(); @@ -1058,10 +1060,8 @@ static int __init xenbus_probe_init(void) return err; } - if (!dom0) { - xenstored_ready = 1; + if (!dom0) xenbus_probe(NULL); - } return 0; } -- 2.30.2